<?php
namespace app\admin\controller;
use think\Controller;  //include   require
use think\Db;
class Common  extends  Controller
{
    public  function   _initialize(){//初始化方法
        $info = $_SERVER;
        $systemInfo=array();
        $systemInfo['HTTP_HOST']=$info['HTTP_HOST'];
        $systemInfo['SERVER_SOFTWARE'] =$info['SERVER_SOFTWARE'];
        $systemInfo['SERVER_PORT'] =$info['SERVER_PORT'];
        $systemInfo['DOCUMENT_ROOT'] =$info['DOCUMENT_ROOT'];
        $systemInfo['HTTP_ACCEPT'] =$info['HTTP_ACCEPT'];
        $systemInfo['HTTP_ACCEPT'] =$info['HTTP_ACCEPT'];
        $systemInfo['HTTP_USER_AGENT'] =$info['HTTP_USER_AGENT'];
        $this->assign('systemInfo',$systemInfo);//将变量分配到页面上
    }
}
